import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class code1 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();

        char[] ss = str.toCharArray();

        int left = 0;
        int right = 0;
        int Mlen = 0;
        String ret = "";
        while (right < ss.length) {
            //是数字
            if (ss[right] >= '0' && ss[right] <= '9') {
                if (right - left + 1 > Mlen) {
                    //找到更大的
                    Mlen = right - left + 1;
                    ret = str.substring(left, right + 1);
                }
                right++;
            } else {
                //不为数字
                right++;
                left = right;
            }
        }

        System.out.print(ret);

    }
}